# -*- coding: utf-8 -*-
# Created by 'Zhou Bingbing'  on 2019/8/24
from gevent import pywsgi

from nnml.config_setting import *
@app.route('/',methods=['GET','POST'])
def find_words():
    if request.method=='GET':
        text=request.args.get('text')
        res=get_count(text)
        return str(res)
    if request.method == 'POST':
        data=request.get_json()
        text=data['text']
        res = get_count(text)
        return str(res)
if __name__=="__main__":
    server = pywsgi.WSGIServer(("0.0.0.0", 10000), app)
    server.serve_forever()
